package cc.jcizp.userservice.dto;

import cc.jcizp.userservice.domain.User;
import cc.jcizp.userservice.enums.ExecutionStateEnum;

//操作执行结果DTO
public class ExecutionResult {

    //操作状态
    private int state;

    //操作信息
    private String info;

    //用户对象
    private User user;

    public ExecutionResult(int state, String info, User user) {
        this.state = state;
        this.info = info;
        this.user = user;
    }

    public ExecutionResult(ExecutionStateEnum executionStateEnum,User user){
        this.state = executionStateEnum.getState();
        this.info = executionStateEnum.getInfo();
        this.user = user;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
